<template>
  <el-dialog
      title="更换至分组"
      :visible.sync="visible"
      width="40%"
      :before-close="onClose">
      <el-form class="form-wrap" ref="form" label-position="left" :model="form" label-width="100px" size="small">
        <el-form-item label="更换至分组">
          <el-select v-model="value" placeholder="请选择" style="width: 320px;">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="onClose">取消</el-button>
        <el-button type="primary" @click="onClose">保存</el-button>
      </span>
    </el-dialog>
</template>
<script>
export default {
  data() {
    return {
      options: [{
          value: 1,
          label: '第一组'
        }, {
          value: 2,
          label: '第二组'
        }],
        value: ''
    }
  },
  props: ['visible'],
  methods: {
    onClose() {
      this.$emit('onClose');
    }
  },
}
</script>
<style lang="scss" scoped>
.form-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
</style>